package com.hermes.action.homepage;

import com.hermes.biz.service.item.UserItemRelationService;
import com.hermes.common.action.AsynBaseAction;

public class GetInterestItem extends AsynBaseAction{
	
	UserItemRelationService userItemRelationService;
	
	private static final long serialVersionUID = 1830093371811615643L;
	
	public int itemLVcount = 0;

	@Override
	public String execute() throws Exception {
		itemLVcount = getIntrstItem(7);
		return SUCCESS;
	}
	/**
	 * 
	 * @param userID
	 * @return int  count of intrest items
	 */
	public int getIntrstItem(long userID){	
		return userItemRelationService.getUserInterestedItems(userID).size();
	}
	
	//getters and setters
	public UserItemRelationService getUserItemRelationService() {
		return userItemRelationService;
	}
	public void setUserItemRelationService(
			UserItemRelationService userItemRelationService) {
		this.userItemRelationService = userItemRelationService;
	}
}
